BuffEffect7 = BaseBuffEffect:new();
BuffEffect7.__index = BuffEffect7;

function BuffEffect7:new()
    local object = {};
    setmetatable(object, BuffEffect7);
    return object;
end

function BuffEffect7:action(fight,buff,...)
    local fighter = nil;
    local target = buff.target;
    local values = decodeJsonStrToTabel(buff.buffBean.f_BuffEffectValue);
    if values[2] == 0 then
        fighter = buff.source;
    else 
        fighter = buff.target;
    end

    local result = FightResult.New();

    -- 计算恢复值
    FightDamageManager.countDamage(fight, fighter, fighter, result, true, false, EnumConst.SkillDamageTypeEnum.HEAL, values[3], values[1], values[4]);

    FightDamageManager.realDamage(fight, buff.source, buff.target, result, EnumConst.SkillDamageTypeEnum.HEAL);
    fightLog("[EFFECT]Fighter "..buff.target.fighterId.." Buff"..buff.modelId .." 触发回复HP效果，增加HP："..result.damage);

    return BaseBuffEffect:action(fight, buff, ...);
end